package com.edu.controller;
/*
 * @Author:princess
 * @Date 2023/11/14 11 14 18:49
 *  如何在 SpringMVC中 去获取 Servlet的 API 即 获取 request/session/application/response对象
 */

import com.edu.bean.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

@Controller
public class ServletController {
    @RequestMapping("/getApi")
    public String getApi(HttpServletRequest request, HttpServletResponse response, HttpSession session){
        System.out.println(request);
        System.out.println(response);
        System.out.println(session);
        System.out.println(request.getServletContext());
        return "index.jsp";
    }
}
